package com.xuexiang.xuidemo.slice.progress;

import com.xuexiang.xui_lib.component.progress.loading.*;
import com.xuexiang.xuidemo.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.components.Image;

public class DeterminateCircularSlice extends AbilitySlice {
    private Image image;
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_slice_determinate_circular);
        initView();
        setUpView();
    }

    public void initView(){
        image = (Image) findComponentById(ResourceTable.Id_determinate_circular_backImage);
    }

    public void setUpView(){
        image.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                terminate();
            }
        });
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    protected void onStop() {
        super.onStop();
//        miniLoadingView.stop();
//        if(mLoadingView.isStart()){
//            mLoadingView.stop();
//        }
//
//        if(loadingViewLayout.isLoading()){
//            loadingViewLayout.dismiss();
//        }
    }
}
